﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Transactions {
    import Engine.Helpers.*;
    import Classes.*;

    public class TLinkedObjectMove extends TWorldState {

        protected var m_params:Object;

        public function TLinkedObjectMove(_arg1:MapResource, _arg2:Array){
            var _local5:MapResource;
            this.m_params = new Object();
            super(_arg1);
            this.m_params.linkedObjects = new Array();
            var _local3:Array = new Array();
            var _local4:Vector3 = _arg1.getPosition();
            _local3["x"] = _local4.x;
            _local3["y"] = _local4.y;
            _local3["direction"] = _arg1.getDirection();
            this.m_params.linkedObjects[_arg1.getId()] = _local3;
            for each (_local5 in _arg2) {
                _local3 = new Array();
                _local4 = _local5.getPosition();
                _local3["x"] = _local4.x;
                _local3["y"] = _local4.y;
                _local3["direction"] = _local5.getDirection();
                this.m_params.linkedObjects[_local5.getId()] = _local3;
            };
        }
        override public function perform():void{
            signedWorldAction("linkedObjectMove", this.m_params);
        }

    }
}//package Transactions 
